package com.sks.service.base.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sks.bean.pojo.SksInfo;
import com.sks.core.SystemConstants;
import com.sks.dao.base.SksInfoDao;
import com.sks.service.base.BaseService;
import com.sks.service.base.SksInfoService;

@Service
@Transactional
public class SksInfoServiceBean extends BaseService<SksInfo> implements SksInfoService {

	@Resource(name = "sksInfoDao")
	public void setSksInfoDao(SksInfoDao sysInfoDao) {
		this.setDao(sysInfoDao);
	}
	
	@Override
	public SksInfo getAboutUs() {
		return (SksInfo) this.getObjectByJpql("select si from SksInfo si where si.sksKey = ?", new Object[]{SystemConstants.SKS_ABOUT_US});
	}
	
	@Override
	public SksInfo getSksIntroduce() {
		return (SksInfo) this.getObjectByJpql("select si from SksInfo si where si.sksKey = ?", new Object[]{SystemConstants.SKS_INTRODUCE});
	}
}
